package com.jy.appmarket.network.resultdata;

import com.jy.app.market.idata.Doc;
import com.jy.app.market.idata.data.AppUpdate;

/**
 * 类说明：
 * 
 */

public class AppUpdateResult extends BaseResultData {
	private AppUpdate mAppUpdate;

	public AppUpdate getAppUpdate() {
		return mAppUpdate;
	}

	@Override
	public boolean parseResult(String result) {
		Doc doc = Doc.fromJson(result);
		if (doc == null) {
			return false;
		}
		setDataType(doc.getDataType());
		setStatus(doc.getStatus());
		setMessage(doc.getMessage());

		if (doc.isOk()) {
			if (doc.isType(AppUpdate.class)) {
				AppUpdate appUpdate = doc.getData();
				mAppUpdate = appUpdate;
				return true;
			}
		}
		return false;
	}
}
